package com.example.myapplication.flutter;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.widget.FrameLayout;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.Nullable;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.plugin.common.EventChannel;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.view.FlutterView;

/**
 * @author: Administrator
 * @date: 2018/12/29   14:11
 * @description:
 */
public class NativeActivity extends FlutterActivity {

    private TextView textView;

    private FrameLayout frameLayout;
    private FlutterView flutterView;

    public static final String FlutterToAndroidCHANNEL  = "com.litngzhe.toandroid/plugin";
    public static final String  AndroidToFlutterCHANNEL= "com.litngzhe.toflutter/plugin";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//
//
//        new EventChannel(flutterView, AndroidToFlutterCHANNEL)
//                .setStreamHandler(new EventChannel.StreamHandler() {
//                    @Override
//                    public void onListen(Object o, EventChannel.EventSink eventSink) {
//                        String androidParmas = "来自android原生的参数";
//                        eventSink.success(androidParmas);
//                    }
//
//                    @Override
//                    public void onCancel(Object o) {
//
//                    }
//                });


    }
}
